/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package invitator.reflect;

import java.lang.reflect.Field;

/**
 *
 * @author muller
 */
public class ReflectTool {

    public boolean isAnyFieldEmpty(Object object) throws IllegalArgumentException, IllegalAccessException {
        if (object == null) {
            return false;
        }
       // Class aClass = object.getClass();
        Field[] fields = object.getClass().getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
            fields[i].setAccessible(true);
            if (fields[i].get(object) == null) {
                return true;
            }
        }
        return false;
    }
}
